package org.csu.forum.domain.VO;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.csu.forum.domain.PO.Collectpost;
import org.csu.forum.domain.PO.Post;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Data
@Component

public class CollectpostContentVO implements Serializable {

    @JsonIgnore
    private Collectpost collectpost;

    @JsonIgnore
    private Post post;

    private int userid;

    @JsonIgnore
    private int collectPostId;

    private int postid;

    private String content;

    private int fileid;

    private int zoneid;

    public CollectpostContentVO(){
        this.collectpost = new Collectpost();
        this.post = new Post();
    }

    public Collectpost getCollectpost() {return collectpost;}

    public void setCollectpost(Collectpost collectpost) {   this.collectpost=collectpost;}

    public Post getPost() {return post;}

    public void setPost(Post post) {    this.post=post; }

    public void setParameter(){

        this.content = this.post.getContent();
        this.fileid = this.post.getFileid();
        this.zoneid = this.post.getZoneid();
        this.userid = this.collectpost.getUserid();
        this.postid = this.collectpost.getCollectPostId();

    }
}
